<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Withdrawal/index')}">申请列表</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="{:url('Withdrawal/index')}">
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 220px;" value="{:input('request.keyword/s','')}" placeholder="姓名/手机号/邮箱">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Withdrawal/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form margin-top-20" action="#">
        <div class="table-actions">
            <button class="btn btn-sm btn-success js-ajax-submit" type="submit"
                    data-action="{:url('Withdrawal/toggle',array('status'=>2))}" data-subcheck="true">{:lang('SIGN_PROCESSED')}
            </button>
            <button class="btn btn-sm btn-danger js-ajax-submit" type="submit"
                    data-action="{:url('Withdrawal/toggle',array('status'=>1))}" data-subcheck="true">{:lang('SIGN_UNTREATED')}
            </button>
        </div>
        <php>$status=array("1"=>lang('UNTREATED'),"2"=>lang('PROCESSED'));</php>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x"
                                             data-checklist="js-check-x"></label></th>
                <th width="50">ID</th>
                <th>姓名</th>
                <th>手机号/邮箱</th>
                <th>内容</th>
                <th>{:lang('APPLICATION_TIME')}</th>
                <th width="50">{:lang('STATUS')}</th>
                <th width="120">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}"></td>
                    <td>{$vo.id}</td>
                    <td>{$vo.user_name}</td>
                    <td>{$vo.str}</td>
                    <td>{$vo.content}</td>
                    <td>{$vo['create_time']}</td>
                    <td>
                        <if condition="$vo.status eq 1">
                            <span class="label btn-danger">
                                {$status[$vo['status']]}
                            </span>
                            <else/>
                            <span class="label label-success">
                                {$status[$vo['status']]}
                            </span>
                        </if>
                    </td>
                    <td>
                        <if condition="$vo['status'] eq 1">
                            <a class="btn btn-xs btn-primary js-ajax-delete" data-msg="{:lang('WANT_TO_THIS')}"  href="{:url('Withdrawal/toggle',array('ids'=>$vo['id'],'status'=>2))}">{:lang('SIGN_PROCESSED')}</a>
                            <else/>
                          /
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>